package com.jeasonzhao.report.codes;

import com.jeasonzhao.commons.basic.IntegerPair;

public final class ReportSortModes extends IntegerPair
{
	private static final long serialVersionUID = 1L;
    public static final ReportSortModes None = new ReportSortModes( -1,"None");
    public static final ReportSortModes Ascending = new ReportSortModes(1,"Ascending");
    public static final ReportSortModes Descending = new ReportSortModes(2,"Descending");
    protected ReportSortModes(int nId,String strName)
    {
        super(nId,strName);
    }

    public static ReportSortModes fromName(String str)
    {
        return(ReportSortModes) IntegerPair.findConstant(ReportSortModes.class,str,None);

    }

    public boolean isNone()
    {
        return this.equals(None);
    }

    public int hashCode()
    {
        return super.hashCode();
    }

    public boolean isAscending()
    {
        return this.equals(Ascending);
    }

    public boolean isDescending()
    {
        return this.equals(Descending);
    }
}
